function PShowWaitMessage(e,t){if(t==null)t=false;PCloseWaitMessage(e,t);var n=document.getElementById(e);if(n){if(window.ajaxMessages==null)window.ajaxMessages={};if(!window.ajaxMessages.wait)window.ajaxMessages.wait="Wait...";n.innerHTML=window.ajaxMessages.wait;if(t)n.style.display="inline"}}function PCloseWaitMessage(e,t){if(t==null)t=false;var n=document.getElementById(e);if(n){n.innerHTML="";if(t)n.style.display="none"}}function JCPHttpRequest(){this.Action={};this.InitThread=function(){while(true){var e="TID"+Math.floor(Math.random()*1e6);if(!this.Action[e])break}return e};this.SetAction=function(e,t){this.Action[e]=t};this._Close=function(e,t){if(this.Action[e])this.Action[e]=null;t=null};this._OnDataReady=function(e,t){if(this.Action[e]){this.Action[e](t)}};this._CreateHttpObject=function(){var e=null;if(window.XMLHttpRequest){try{e=new XMLHttpRequest}catch(t){}}else if(window.ActiveXObject){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}if(!e)try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}}return e};this._SetHandler=function(TID,httpRequest){var _this=this;function __handlerReadyStateChange(){if(httpRequest.readyState==4){var s=httpRequest.responseText;var code=[];var start;while((start=s.indexOf("<script>"))!=-1){var end=s.indexOf("</script>",start);if(end!=-1){code[code.length]=s.substr(start+8,end-start-8);s=s.substr(0,start)+s.substr(end+9)}else{s=s.substr(0,start)+s.substr(start+8)}}_this._OnDataReady(TID,s);for(var i in code)if(code[i]!="")eval(code[i]);_this._Close(TID,httpRequest)}}httpRequest.onreadystatechange=__handlerReadyStateChange};this._MyEscape=function(e){return escape(e).replace(/\+/g,"%2B")};this._PrepareData=function(e,t){var n="";if(e!=null){for(var a in e){if(n.length>0)n+="&";var i=this._MyEscape(a);if(t)i=t+"["+i+"]";if(typeof e[a]=="object")n+=this._PrepareData(e[a],i);else n+=i+"="+this._MyEscape(e[a])}}return n};this.Send=function(e,t,n){if(n!=null)var a=this._PrepareData(n);if(a.length>0){if(t.indexOf("?")==-1)t+="?"+a;else t+="&"+a}var i=this._CreateHttpObject();if(i){i.open("GET",t,true);this._SetHandler(e,i);return i.send("")}return false};this.Post=function(e,t,n){var a="";if(n!=null)a=this._PrepareData(n);var i=this._CreateHttpObject();if(i){i.open("POST",t,true);this._SetHandler(e,i);i.setRequestHeader("Content-Type","application/x-www-form-urlencoded");return i.send(a)}return false};this.__migrateSetHandler=function(e,t,n){function a(){if(!t.contentWindow.document||t.contentWindow.document.body.innerHTML.length==0)return;if(null!=n)n(t.contentWindow.document.body.innerHTML)}if(t.addEventListener){t.addEventListener("load",a,false)}else if(t.attachEvent){t.attachEvent("onload",a)}};this.MigrateFormToAjax=function(e,t){if(!e)return;if(e.target&&e.target.substring(0,5)=="AJAX")return;var n=document.createElement("INPUT");n.type="hidden";n.name="AJAX_CALL";n.value="Y";e.appendChild(n);var a="AJAX_"+Math.round(Math.random()*1e5);if(document.getElementById("frameName"))var i=document.getElementById("frameName");else{if(currentBrowserDetected=="IE")var i=document.createElement('<iframe name="'+a+'"></iframe>');else var i=document.createElement("IFRAME");i.style.display="none";i.src="";i.id=a;i.name=a;document.body.appendChild(i)}e.target=a;this.__migrateSetHandler(e,i,t)}}var CPHttpRequest=new JCPHttpRequest;var currentBrowserDetected="";if(window.opera)currentBrowserDetected="Opera";else if(navigator.userAgent){if(navigator.userAgent.indexOf("MSIE")!=-1)currentBrowserDetected="IE";else if(navigator.userAgent.indexOf("Firefox")!=-1)currentBrowserDetected="Firefox"}
//# sourceMappingURL=cphttprequest.map.js